home *** CD-ROM | disk | FTP | other *** search
- 1 '================= セレクターの為の初期設定
- 2 CLEAR ,,,,8192,300*1024:MOUSE 0
- 3 S_O&=0:LOADM"BAS_LIB.REX",S_O&' <=== BASLIB.REXのある所に書き換える
- 4 S_FULL=512:DIM S_F$(S_FULL),S_SEL%(3796*2)
- 5 GOSUB *S_PATH:S_P$=S_PATH$+"sel12.dat"+CHR$(0)
- 6 S_左上X= 0:S_左上Y= 0' <=== FILE SELECTORの移動範囲を設定
- 7 S_右下X=639:S_右下Y=479' この値がオリジナルスクリーン座標を越えないように!
- 8 'ファイル名入力 |DIR移動禁止|拡張子(*,?も可) |メッセージ(MAX:ANK8文字)
- 9 'S_INPUT -1/0|S_PATH -1/0|S_KAKU$ ".TIF"ex.|S_MES$ "LOADTIFF"ex.
- 50000 '
- 50010 '□□ FILE SELECTOR「尽くせり」(FONT 12) V1.0 □□
- 50020 '
- 50030 *S_SEL
- 50040 '■ 使用可能ドライブの取得
- 50050 S_DD$="AB":S_PATH$=STRING$(65,0)
- 50060 FOR S_A%=68 TO 80
- 50070 S_RET&=CALLM(S_O&,2,S_A%,VARPTR(S_PATH$))
- 50080 IF S_RET&=0 THEN S_DD$=S_DD$+CHR$(S_A%)
- 50090 NEXT
- 50100 S_DD$=S_DD$+"Q":S_DD=LEN(S_DD$)
- 50110 '■ 初期化
- 50120 MOUSE 1,,,1:DEF FONT"システム 12ドット":DEF PEN 0
- 50130 S_Q=0:S_MK=0:S_EX=97:S_COL=12:S_MODE=0
- 50140 IF S_INPUT THEN S_EY=145 ELSE S_EY=128
- 50150 S_VSX1=VIEW(0):S_VSY1=VIEW(1):S_VSX2=VIEW(2):S_VSY2=VIEW(3)
- 50160 S_WSX1=WINDOW(0):S_WSY1=WINDOW(1):S_WSX2=WINDOW(2):S_WSY2=WINDOW(3)
- 50170 VIEW(0,0)-(S_右下X,S_右下Y):WINDOW(0,0)-(S_右下X,S_右下Y)
- 50180 '■ 画面モード取得
- 50190 GET@A(S_SX,S_SY)-(S_SX,S_SY),S_SEL%,2
- 50200 PSET(S_SX,S_SY),[255,255,255]:S_SEL%(0)=0
- 50210 GET@A(S_SX,S_SY)-(S_SX,S_SY),S_SEL%
- 50220 PUT@A(S_SX,S_SY)-(S_SX,S_SY),S_SEL%,,,,,2
- 50230 IF S_SEL%(0)=15 THEN
- 50240 S_UN&=INT((98+7)/8)*2*146:S_M=0
- 50250 ELSE IF S_SEL%(0)=255 THEN
- 50260 S_UN&=98*146/2:S_M=2
- 50270 ERASE S_SEL%:DIM S_SEL%(S_UN&*2)
- 50280 ELSE IF S_SEL%(0)=32767 THEN
- 50290 S_UN&=98*146:S_M=1
- 50300 ERASE S_SEL%:DIM S_SEL%(S_UN&*2)
- 50310 ELSE IF S_SEL%(0)=-1 THEN
- 50320 S_UN&=98*146/2*3:S_M=1
- 50330 ERASE S_SEL%:DIM S_SEL%(S_UN&*2)
- 50340 ENDIF
- 50350 GET@A(S_SX,S_SY)-(S_SX+S_EX,S_SY+S_EY),S_SEL%,S_UN&
- 50360 GOSUB *S_11:LINE(S_SX,S_SY)-(S_SX+S_EX,S_SY+S_EY),PSET,,BF
- 50370 RET&=CALLM(S_O&,12,20,VARPTR(S_SEL%(0)),VARPTR(S_P$),0,1898)
- 50380 IF RET&<>0 THEN
- 50390 LINE(S_SX+1,S_SY+1)-(S_SX+S_EX-1,S_SY+S_EY-1),PSET,0,BF
- 50400 SYMBOL(S_SX+9,S_SY+30)," Can't Find",.75!,.75!,7
- 50410 SYMBOL(S_SX+9,S_SY+54)," [SEL16.DAT]",.75!,.75!,7
- 50420 SYMBOL(S_SX+9,S_SY+78),"Click Button.",.75!,.75!,7
- 50430 WHILE MOUSE(2,0)+MOUSE(2,1)=0:WEND:S_FILE$="":S_PATH$=""
- 50440 PUT@A(S_SX,S_SY)-(S_SX+S_EX,S_SY+S_EY),S_SEL%,,,,,S_UN&:RETURN
- 50450 ENDIF
- 50460 GOSUB *S_12:PUT@(S_SX,S_SY)-(S_SX+S_EX,S_SY+S_EY),S_SEL%
- 50470 IF S_KAKU$="" THEN S_KAKU$=".*"
- 50480 IF KLEFT$(S_KAKU$,1)<>"." THEN S_KAKU$="."+S_KAKU$
- 50490 S_MES$=LEFT$(S_MES$,8):S_KAKU$=LEFT$(S_KAKU$,4)
- 50500 IF S_PATH THEN
- 50510 GOSUB *S_PATH
- 50520 IF LEN(S_PATH$)>3 THEN S_PP$=KLEFT$(S_PATH$,LEN(S_PATH$)-1)
- 50530 ENDIF
- 50540 GOSUB *S_12:SYMBOL(S_SX+33,S_SY+4),S_MES$,.75!,.45!
- 50550 IF S_M<>1 THEN
- 50560 OUT &HFD90,11
- 50570 S_11%(0)=INP(&HFD92):S_11%(1)=INP(&HFD94):S_11%(2)=INP(&HFD96)
- 50580 OUT &HFD90,12
- 50590 S_12%(0)=INP(&HFD92):S_12%(1)=INP(&HFD94):S_12%(2)=INP(&HFD96)
- 50600 OUT &HFD90,13
- 50610 S_13%(0)=INP(&HFD92):S_13%(1)=INP(&HFD94):S_13%(2)=INP(&HFD96)
- 50620 OUT &HFD90,15+S_M*120
- 50630 S_15%(0)=INP(&HFD92):S_15%(1)=INP(&HFD94):S_15%(2)=INP(&HFD96)
- 50640 PALETTE 11,[88,24,24]
- 50650 PALETTE 12,[168,96,104]
- 50660 PALETTE 13,[248,144,192]
- 50670 PALETTE 15+S_M*120,[255,255,255]
- 50680 ENDIF
- 50690 GOSUB *S_DRV:GOSUB *S_GET:GOSUB *S_CLR
- 50700 '■ MAIN
- 50710 WHILE S_Q=0
- 50720 GOSUB *S_MOUSE0:S_X=S_X-S_SX:S_Y=S_Y-S_SY
- 50730 *S_MAIN
- 50740 IF MOUSE(2,0) THEN
- 50750 IF S_X>=0 AND S_X<=S_EX AND S_Y>=0 AND S_Y<=S_EY THEN GOSUB *S_CK
- 50760 GOSUB *S_WH
- 50770 ENDIF
- 50780 IF MOUSE(2,1)=-1 AND S_MK=-1 THEN
- 50790 S_I=S_SY+30+S_MKY*12
- 50800 IF S_MKY<>-1 THEN LINE(S_SX+3,S_I)-(S_SX+86,S_I+11),XOR,7,BF
- 50810 S_MK=0
- 50820 ENDIF
- 50830 WEND
- 50840 IF S_FILE$<>"" AND KINSTR(S_FILE$,".")=0 THEN
- 50850 IF KINSTR(S_KAKU$,"*")=0 AND KINSTR(S_KAKU$,"?")=0 THEN
- 50860 S_MK$=LEFT$(S_FILE$,8)+S_KAKU$:GOSUB *S_CLR:WAIT 20
- 50870 S_FILE$=S_MK$
- 50880 ENDIF
- 50890 ENDIF
- 50900 IF S_M<>1 THEN
- 50910 PALETTE 11,[S_11%(2),S_11%(1),S_11%(0)]
- 50920 PALETTE 12,[S_12%(2),S_12%(1),S_12%(0)]
- 50930 PALETTE 13,[S_13%(2),S_13%(1),S_13%(0)]
- 50940 PALETTE 15+S_M*120,[S_15%(2),S_15%(1),S_15%(0)]
- 50950 ENDIF
- 50960 PUT@A(S_SX,S_SY)-(S_SX+S_EX,S_SY+S_EY),S_SEL%,,,,,S_UN&
- 50970 VIEW(S_VSX1,S_VSY1)-(S_VSX2,S_VSY2)
- 50980 WINDOW(S_WSX1,S_WSY1)-(S_WSX2,S_WSY2)
- 50990 IF S_PATH THEN
- 51000 GOSUB *S_PATH
- 51010 S_DRV$=LEFT$(S_PP$,1):CALLM S_O&,3,ASC(S_DRV$)
- 51020 S_PP$=MID$(S_PP$,3)+CHR$(0):CALLM S_O&,4,VARPTR(S_PP$)
- 51030 ELSE
- 51040 S_PATH$=""
- 51050 ENDIF
- 51060 RETURN
- 51070 '■ 左クリック
- 51080 *S_CK
- 51090 S_TR=4:GOSUB *S_TR
- 51100 IF S_TR=-1 THEN
- 51110 GOSUB *S_ON
- 51120 S_DRV=S_DRV-1-(S_DRV=1)*S_DD:S_F=-1
- 51130 S_DRV$=MID$(S_DD$,S_DRV,1)
- 51140 GOSUB *S_DRV_M:GOSUB *S_OFF:RETURN
- 51150 ENDIF
- 51160 S_TR=5:GOSUB *S_TR
- 51170 IF S_TR=-1 THEN
- 51180 GOSUB *S_ON
- 51190 S_DRV=S_DRV+1+(S_DRV=S_DD)*S_DD:S_F=-1
- 51200 S_DRV$=MID$(S_DD$,S_DRV,1)
- 51210 GOSUB *S_DRV_M:GOSUB *S_OFF:RETURN
- 51220 ENDIF
- 51230 S_TR=3:GOSUB *S_TR
- 51240 IF S_TR=-1 THEN
- 51250 GOSUB *S_ON:S_Q=1:S_FILE$="":RETURN
- 51260 ENDIF
- 51270 S_TR=2:GOSUB *S_TR
- 51280 IF S_TR=-1 THEN
- 51290 GOSUB *S_ON:GOSUB *S_CDRV:GOSUB *S_OFF:RETURN
- 51300 ENDIF
- 51310 S_TR=1:GOSUB *S_TR
- 51320 IF S_TR=-1 THEN
- 51330 GOSUB *S_ON
- 51340 IF S_MODE=0 THEN S_KZ$=S_KAKU$:S_KAKU$=".*" ELSE S_KAKU$=S_KZ$
- 51350 S_MODE=(S_MODE=0):S_F=-1
- 51360 IF S_MODE=0 THEN S_TR=1:GOSUB *S_TR:GOSUB *S_OFF
- 51370 ENDIF
- 51380 IF S_F THEN GOSUB *S_CDRV:RETURN
- 51390 IF S_X>=3 AND S_Y>=30 AND S_X<=86 AND S_Y<=125 THEN *S_FILE
- 51400 S_TR=6:GOSUB *S_TR
- 51410 IF S_TR=-1 THEN
- 51420 GOSUB *S_ON
- 51430 WHILE MOUSE(2,0)
- 51440 IF S_START>1 THEN
- 51450 S_START=S_START-1:S_I=0
- 51460 IF S_MKY<7 AND S_MKY>-1 THEN S_MKY=S_MKY+1 ELSE S_MKY=-1
- 51470 GET@A(S_SX+3,S_SY+30)-(S_SX+86,S_SY+113),S_SEL%
- 51480 PUT@A(S_SX+3,S_SY+42)-(S_SX+86,S_SY+125),S_SEL%
- 51490 GOSUB *S_BA2
- 51500 ENDIF
- 51510 WEND
- 51520 GOSUB *S_OFF:RETURN
- 51530 ENDIF
- 51540 S_TR=7:GOSUB *S_TR
- 51550 IF S_TR=-1 THEN
- 51560 GOSUB *S_ON
- 51570 WHILE MOUSE(2,0)
- 51580 IF S_START+7<S_MAX THEN
- 51590 S_START=S_START+1:S_I=7
- 51600 IF S_MKY<8 AND S_MKY>0 THEN S_MKY=S_MKY-1 ELSE S_MKY=-1
- 51610 GET@A(S_SX+3,S_SY+42)-(S_SX+86,S_SY+125),S_SEL%
- 51620 PUT@A(S_SX+3,S_SY+30)-(S_SX+86,S_SY+113),S_SEL%
- 51630 GOSUB *S_BA2
- 51640 ENDIF
- 51650 WEND
- 51660 GOSUB *S_OFF:RETURN
- 51670 ENDIF
- 51680 S_TR=8:GOSUB *S_TR
- 51690 IF S_TR=-1 THEN
- 51700 GOSUB *S_ON
- 51710 S_DIR$=".."+CHR$(0)
- 51720 CALLM S_O&,4,VARPTR(S_DIR$)
- 51730 GOSUB *S_GET:S_MK=0:GOSUB *S_OFF:RETURN
- 51740 ENDIF
- 51750 IF S_INPUT=-1 THEN
- 51760 S_TR=9:GOSUB *S_TR
- 51770 IF S_TR=-1 THEN
- 51780 GOSUB *S_ON:S_FILE$=S_MK$:S_Q=1:RETURN
- 51790 ENDIF
- 51800 S_TR=10:GOSUB *S_TR
- 51810 IF S_TR=-1 THEN
- 51820 GOTO *S_SFT
- 51830 ELSE IF S_X>=15 AND S_Y>=131 AND S_X<=86 AND S_Y<=142 THEN
- 51840 GOTO *S_ENT
- 51850 ENDIF
- 51860 ENDIF
- 51870 IF S_X>=88 AND S_Y>=38 AND S_X<=94 AND S_Y<=117 THEN
- 51880 S_COL=13:S_Y=S_Y-38
- 51890 IF S_Y<S_BY OR S_Y>S_BY+S_BL THEN S_BY=S_Y-INT(S_BL/2)
- 51900 IF S_BY<0 THEN S_BY=0
- 51910 IF S_BY+S_BL>79 THEN S_BY=79-S_BL
- 51920 S_OY=S_BY-S_Y:S_Y=0
- 51930 WHILE MOUSE(2,0)
- 51940 S_YY=S_START:GOSUB *S_MOUSE0:S_Y=S_Y-S_SY-38
- 51950 S_BY=S_Y+S_OY
- 51960 IF S_BY<0 THEN S_BY=0
- 51970 IF S_BY+S_BL>79 THEN S_BY=79-S_BL
- 51980 IF S_MAX<72 THEN
- 51990 S_START=S_BY+1
- 52000 ELSE
- 52010 S_START=CINT(S_BY*((S_MAX-8)/71)+1)
- 52020 ENDIF
- 52030 IF S_START<>S_YY THEN
- 52040 GOSUB *S_PUT
- 52050 ENDIF
- 52060 WEND
- 52070 S_COL=12:GOSUB *S_BAR:RETURN
- 52080 ENDIF
- 52090 '■ セレクターの移動
- 52100 *S_MOVE
- 52110 S_OX=-S_X:S_OY=-S_Y
- 52120 GET@A(S_SX,S_SY)-(S_SX+S_EX,S_SY+S_EY),S_SEL%
- 52130 PUT@A(S_SX,S_SY)-(S_SX+S_EX,S_SY+S_EY),S_SEL%,,,,,S_UN&
- 52140 LINE(S_SX,S_SY)-(S_SX+S_EX,S_SY+S_EY),XOR,7,B
- 52150 WHILE MOUSE(2,0)
- 52160 S_XX=S_X:S_YY=S_Y:GOSUB *S_MOUSE0
- 52170 IF S_XX<>S_X OR S_YY<>S_Y THEN
- 52180 LINE(S_SX,S_SY)-(S_SX+S_EX,S_SY+S_EY),XOR,7,B
- 52190 S_SX=S_X+S_OX:S_SY=S_Y+S_OY
- 52200 IF S_SX<S_左上X THEN S_SX=S_左上X
- 52210 IF S_SY<S_左上Y THEN S_SY=S_左上Y
- 52220 IF S_SX+S_EX>S_右下X THEN S_SX=S_右下X-S_EX
- 52230 IF S_SY+S_EY>S_右下Y THEN S_SY=S_右下Y-S_EY
- 52240 LINE(S_SX,S_SY)-(S_SX+S_EX,S_SY+S_EY),XOR,7,B
- 52250 ENDIF
- 52260 WEND
- 52270 LINE(S_SX,S_SY)-(S_SX+S_EX,S_SY+S_EY),XOR,7,B
- 52280 GET@A(S_SX,S_SY)-(S_SX+S_EX,S_SY+S_EY),S_SEL%,S_UN&
- 52290 PUT@A(S_SX,S_SY)-(S_SX+S_EX,S_SY+S_EY),S_SEL%
- 52300 RETURN
- 52310 '■ ファイルウィンドウ内でクリックされた
- 52320 *S_FILE
- 52330 IF S_MK=0 THEN
- 52340 GOSUB *S_MARK
- 52350 IF KLEFT$(S_F$(S_START+S_MKY),1)="D" THEN *S_CD
- 52360 ELSE IF ABS(S_X-S_X2)>1 OR ABS(S_Y-S_Y2)>1 THEN
- 52370 S_I=S_SY+30+S_MKY*12
- 52380 IF S_MKY<>-1 THEN LINE(S_SX+3,S_I)-(S_SX+86,S_I+11),XOR,7,BF
- 52390 S_MK=0:GOSUB *S_MARK
- 52400 IF KLEFT$(S_F$(S_START+S_MKY),1)="D" THEN *S_CD
- 52410 ELSE
- 52420 S_FILE$=MID$(S_F$(S_START+S_MKY),2,12)+" "
- 52430 S_FILE$=KLEFT$(S_FILE$,KINSTR(S_FILE$," ")-1)
- 52440 S_Q=1:RETURN
- 52450 ENDIF
- 52460 RETURN
- 52470 '■ ファイルのマーク
- 52480 *S_MARK
- 52490 S_MKY=(S_Y-30)\ 12:S_I=S_SY+30+S_MKY*12
- 52500 IF S_MKY+S_START>S_MAX THEN RETURN
- 52510 LINE(S_SX+3,S_I)-(S_SX+86,S_I+11),XOR,7,BF
- 52520 IF KLEFT$(S_F$(S_START+S_MKY),1)="F" THEN
- 52530 S_MK$=MID$(S_F$(S_START+S_MKY),2,12)
- 52540 S_MK$=S_MK$+" ":S_MK$=KLEFT$(S_MK$,KINSTR(S_MK$," ")-1)
- 52550 IF S_INPUT THEN GOSUB *S_CLR
- 52560 ENDIF
- 52570 S_MKYY=S_START+S_MKY
- 52580 S_MK=-1:S_X2=S_X:S_Y2=S_Y:RETURN
- 52590 '■ カレントドライブを取得
- 52600 *S_DRV
- 52610 S_RET&=CALLM(S_O&,1):S_DRV$=CHR$(S_RET&):S_DRV=INSTR(S_DD$,S_DRV$)
- 52620 *S_DRV_M
- 52630 LINE(S_SX+13,S_SY+4)-(S_SX+18,S_SY+10),PSET,0,BF
- 52640 SYMBOL(S_SX+13,S_SY+4),S_DRV$,.75!,.45!,7
- 52650 S_AA%=0:RETURN
- 52660 '■ 全ファイル名を取得
- 52670 *S_IDO
- 52680 S_I=S_CHECK:S_J=S_I*2:S_Q=0
- 52690 WHILE S_J<=S_N AND S_Q=0
- 52700 IF S_J<S_N THEN IF S_F$(S_J)<S_F$(S_J+1) THEN S_J=S_J+1
- 52710 IF S_F$(S_I)>=S_F$(S_J) THEN
- 52720 S_Q=1
- 52730 ELSE
- 52740 SWAP S_F$(S_I),S_F$(S_J)
- 52750 S_I=S_J:S_J=S_I*2
- 52760 ENDIF
- 52770 WEND
- 52780 S_Q=0:RETURN
- 52790 *S_GET
- 52800 S_MAX=1:S_START=1:S_A%=0:S_RET&=0:S_B$="":S_C=-1
- 52810 IF S_KAKU$=".*" THEN S_B$=S_KAKU$
- 52820 IF S_KAKU$=".?" OR S_KAKU$=".??" THEN S_B$=S_KAKU$
- 52830 IF S_KAKU$="." THEN S_B$=S_KAKU$
- 52840 WHILE S_RET&=0
- 52850 S_A$="*"+S_B$+CHR$(0):S_F$(S_MAX)=STRING$(14," ")
- 52860 S_RET&=CALLM(S_O&,0,VARPTR(S_A$),VARPTR(S_F$(S_MAX)),&H10,S_A%)
- 52870 S_A%=1:S_MAX=S_MAX+1
- 52880 IF S_MAX>S_FULL THEN S_RET&=-1
- 52890 IF S_RET&=0 THEN S_C=0
- 52900 IF S_RET&<>0 AND S_B$="" THEN
- 52910 S_B$=S_KAKU$:S_MAX=S_MAX-1:S_RET&=0:S_A%=0
- 52920 ENDIF
- 52930 WEND
- 52940 IF S_C THEN S_MAX=0:GOTO *S_PUT
- 52950 S_F$(S_MAX-1)="":S_MAX=S_MAX-2
- 52960 '■ ファイル名ソート
- 52970 S_N=S_MAX
- 52980 FOR S_CHECK=CINT(S_N/2) TO 1 STEP -1
- 52990 GOSUB *S_IDO
- 53000 NEXT
- 53010 WHILE S_N>1
- 53020 SWAP S_F$(S_N),S_F$(1)
- 53030 S_N=S_N-1:S_CHECK=1:GOSUB *S_IDO
- 53040 WEND
- 53050 IF KLEFT$(S_F$(1),3)="D. " THEN S_F$(1)="D\ "
- 53060 S_BL=79+(S_MAX-8)*(S_MAX>8):IF S_BL<8 THEN S_BL=8
- 53070 S_BY=0
- 53080 '■ カレントディレクトリーを取得
- 53090 LINE(S_SX+3,S_SY+15)-(S_SX+74,S_SY+26),PSET,0,BF
- 53100 IF S_MAX=0 THEN *S_PUT
- 53110 S_PATH$=STRING$(65,0)
- 53120 S_RET&=CALLM(S_O&,2,ASC(S_DRV$),VARPTR(S_PATH$))
- 53130 S_I=1
- 53140 WHILE S_I>0
- 53150 S_J=S_I+1:S_I=KINSTR(S_J,S_PATH$,"\")
- 53160 WEND
- 53170 S_DIR$=KMID$(S_PATH$,S_J)
- 53180 SYMBOL(S_SX+3,S_SY+15),S_DIR$,.75!,.75!,7
- 53190 '■ ファイル名を8つ表示
- 53200 *S_PUT
- 53210 IF S_MAX=0 THEN
- 53220 LINE(S_SX+3,S_SY+30)-(S_SX+86,S_SY+125),PSET,0,BF
- 53230 LINE(S_SX+3,S_SY+15)-(S_SX+74,S_SY+26),PSET,0,BF
- 53240 GOSUB *S_13:SYMBOL(S_SX+20,S_SY+88),"No Files.",1,1
- 53250 RETURN
- 53260 ENDIF
- 53270 GOSUB *S_BAR:S_MKY=-1
- 53280 FOR S_I=0 TO 7
- 53290 GOSUB *S_P
- 53300 NEXT
- 53310 RETURN
- 53320 *S_P
- 53330 IF S_I+S_START>S_MAX THEN S_F$(S_START+S_I)=""
- 53340 IF KLEFT$(S_F$(S_START+S_I),1)="D" THEN
- 53350 S_A$="< >"
- 53360 MID$(S_A$,2,10)=MID$(S_F$(S_START+S_I),2,12)
- 53370 ELSE IF S_F$(S_START+S_I)<>"" THEN
- 53380 S_J=INSTR(S_F$(S_START+S_I),".")-2
- 53390 IF S_J=-2 THEN S_J=8
- 53400 S_A$=" "
- 53410 MID$(S_A$,2)=MID$(S_F$(S_START+S_I),2,S_J)
- 53420 S_A$=S_A$+MID$(S_F$(S_START+S_I),S_J+2,4)
- 53430 ELSE
- 53440 S_A$=""
- 53450 ENDIF
- 53460 S_J=S_SY+30+S_I*12
- 53470 LINE(S_SX+3,S_J)-(S_SX+86,S_J+11),PSET,0,BF
- 53480 SYMBOL(S_SX+3,S_J),S_A$,.75!,.75!,7
- 53490 IF S_MKYY=S_I+S_START AND S_MK=-1 THEN
- 53500 LINE(S_SX+3,S_J)-(S_SX+86,S_J+11),XOR,7,BF:S_MKY=S_I
- 53510 ENDIF
- 53520 RETURN
- 53530 '■ スクロールバーを描画
- 53540 *S_BA2
- 53550 GOSUB *S_P:WAIT 1
- 53560 IF S_MAX<72 THEN
- 53570 S_BY=S_START-1
- 53580 ELSE
- 53590 S_BY=CINT((S_START-1)/((S_MAX-8)/71))
- 53600 ENDIF
- 53610 *S_BAR
- 53620 IF S_BY<0 THEN S_BY=0
- 53630 IF S_BY+S_BL>117 THEN S_BY=117-S_BL
- 53640 GOSUB *S_11:LINE(S_SX+88,S_SY+38)-(S_SX+94,S_SY+117),PSET,,BF
- 53650 IF S_COL=12 THEN
- 53660 GOSUB *S_12
- 53670 LINE(S_SX+88,S_SY+38+S_BY)-(S_SX+94,S_SY+38+S_BY+S_BL),PSET,,B
- 53680 ELSE
- 53690 GOSUB *S_13
- 53700 LINE(S_SX+88,S_SY+38+S_BY)-(S_SX+94,S_SY+38+S_BY+S_BL),PSET,,B
- 53710 ENDIF
- 53720 RETURN
- 53730 '■ ボタンの処理
- 53740 *S_TR
- 53750 IF S_TR= 6 THEN S_1= 87:S_2= 29:S_3= 95:S_4= 37:GOTO *S_TR_E'▲
- 53760 IF S_TR= 7 THEN S_1= 87:S_2=118:S_3= 95:S_4=126:GOTO *S_TR_E'▼
- 53770 IF S_TR= 4 THEN S_1= 2:S_2= 2:S_3= 9:S_4= 12:GOTO *S_TR_E'<
- 53780 IF S_TR= 5 THEN S_1= 22:S_2= 2:S_3= 29:S_4= 12:GOTO *S_TR_E'>
- 53790 IF S_TR= 8 THEN S_1= 87:S_2= 14:S_3= 95:S_4= 27:GOTO *S_TR_E'UP
- 53800 IF S_TR= 2 THEN S_1= 11:S_2= 2:S_3= 20:S_4= 12:GOTO *S_TR_E'DRIVE
- 53810 IF S_TR=10 THEN S_1= 2:S_2=130:S_3= 14:S_4=143:GOTO *S_TR_E'KEY
- 53820 IF S_TR= 3 THEN S_1= 85:S_2= 2:S_3= 95:S_4= 12:GOTO *S_TR_E'EXIT
- 53830 IF S_TR= 9 THEN S_1= 87:S_2=130:S_3= 95:S_4=143:GOTO *S_TR_E'RET
- 53840 IF S_TR= 1 THEN S_1= 75:S_2= 14:S_3= 85:S_4= 27:GOTO *S_TR_E'.*
- 53850 *S_TR_E
- 53860 IF S_X<S_1 OR S_Y<S_2 OR S_X>S_3 OR S_Y>S_4 THEN S_TR=0 ELSE S_TR=-1
- 53870 RETURN
- 53880 *S_11
- 53890 IF S_M=1 THEN COLOR ,,[88,24,24] ELSE COLOR ,,%11
- 53900 RETURN
- 53910 *S_12
- 53920 IF S_M=1 THEN COLOR ,,[168,96,104] ELSE COLOR ,,%12
- 53930 RETURN
- 53940 *S_13
- 53950 IF S_M=1 THEN COLOR ,,[248,144,192] ELSE COLOR ,,%13
- 53960 RETURN
- 53970 *S_ON
- 53980 IF S_M<>1 THEN
- 53990 GET@(S_SX+S_1,S_SY+S_2)-(S_SX+S_3,S_SY+S_4),S_SEL%,%12
- 54000 ELSE
- 54010 GET@(S_SX+S_1,S_SY+S_2)-(S_SX+S_3,S_SY+S_4),S_SEL%,[168,96,104]
- 54020 ENDIF
- 54030 GOSUB *S_13:PUT@(S_SX+S_1,S_SY+S_2)-(S_SX+S_3,S_SY+S_4),S_SEL%
- 54040 RETURN
- 54050 *S_OFF
- 54060 GOSUB *S_WH
- 54070 IF S_M<>1 THEN
- 54080 GET@(S_SX+S_1,S_SY+S_2)-(S_SX+S_3,S_SY+S_4),S_SEL%,%13
- 54090 ELSE
- 54100 GET@(S_SX+S_1,S_SY+S_2)-(S_SX+S_3,S_SY+S_4),S_SEL%,[248,144,192]
- 54110 ENDIF
- 54120 GOSUB *S_12:PUT@(S_SX+S_1,S_SY+S_2)-(S_SX+S_3,S_SY+S_4),S_SEL%
- 54130 RETURN
- 54140 '■ マウス
- 54150 *S_MOUSE0
- 54160 S_X=MOUSE(0):S_Y=MOUSE(1)
- 54170 IF S_F=-1 THEN
- 54180 S_AA%=S_AA%+1:WAIT 1
- 54190 IF S_AA%=290 THEN S_AA%=0:GOSUB *S_CDRV
- 54200 ENDIF
- 54210 RETURN
- 54220 *S_WH WHILE MOUSE(2,0):WEND:RETURN
- 54230 '■ カレントディレクトリーの移動
- 54240 *S_CD
- 54250 S_MK=0:GOSUB *S_CLR
- 54260 S_I=INSTR(S_F$(S_START+S_MKY)," ")-2
- 54270 IF S_I=-2 THEN S_I=12
- 54280 S_DIR$=MID$(S_F$(S_START+S_MKY),2,S_I)+CHR$(0)
- 54290 CALLM S_O&,4,VARPTR(S_DIR$)
- 54300 GOSUB *S_GET:RETURN
- 54310 '■ カレントドライブの移動
- 54320 *S_CDRV
- 54330 S_MK=0:GOSUB *S_CLR:S_F=0
- 54340 CALLM S_O&,3,ASC(S_DRV$)
- 54350 GOSUB *S_GET:RETURN
- 54360 '■ マークウィンドウを消す
- 54370 *S_CLR
- 54380 IF S_INPUT THEN
- 54390 LINE(S_SX+15,S_SY+131)-(S_SX+86,S_SY+142),PSET,0,BF
- 54400 SYMBOL(S_SX+15,S_SY+131),S_MK$,.75!,.75!,7
- 54410 ENDIF
- 54420 RETURN
- 54430 '■ ソフトウェアキーボード
- 54440 *S_SFT
- 54450 GOSUB *S_ON
- 54460 GET@A(S_SX+2,S_SY+29)-(S_SX+87,S_SY+126),S_SEL%,200
- 54470 GOSUB *S_13
- 54480 LINE(S_SX+2,S_SY+29)-(S_SX+87,S_SY+126),PSET,,BF,0
- 54490 SYMBOL(S_SX+6,S_SY+36),"ソフトウェアキーボード",.75!,.75!
- 54500 SYMBOL(S_SX+3,S_SY+54),"ABCDEFG",.75!,.75!,7
- 54510 SYMBOL(S_SX+3,S_SY+66),"HIJKLMN",.75!,.75!,7
- 54520 SYMBOL(S_SX+3,S_SY+78),"OPQRSTU",.75!,.75!,7
- 54530 SYMBOL(S_SX+3,S_SY+90),"VWXYZ._",.75!,.75!,7
- 54540 SYMBOL(S_SX+3,S_SY+102),"0123456",.75!,.75!,7
- 54550 SYMBOL(S_SX+3,S_SY+114),"789",.75!,.75!,7
- 54560 GOSUB *S_12
- 54570 SYMBOL(S_SX+3+36,S_SY+114),"BS←→",.75!,.75!
- 54580 SYMBOL(S_SX+3+72,S_SY+114),"DEL",.5!,.75!
- 54590 GOSUB *S_WH
- 54600 IF S_ENX-1>LEN(S_MK$) THEN S_ENX=LEN(S_MK$)+1
- 54610 IF S_ENX<1 THEN S_ENX=1
- 54620 GOSUB *S_CUR:S_Q=MOUSE(3,1):S_Q=0
- 54630 WHILE S_Q=0
- 54640 S_Q=MOUSE(3,1):GOSUB *S_MOUSE0:S_X=S_X-S_SX:S_Y=S_Y-S_SY
- 54650 S_A$="":S_A$=INKEY$
- 54660 IF MOUSE(2,0) THEN
- 54670 IF S_X>=2 AND S_Y>=130 AND S_X<=95 AND S_Y<=143 THEN
- 54680 IF S_X<15 THEN S_Q=1:S_X=15
- 54690 IF S_X>86 THEN S_Q=1:S_TR=9:GOSUB *S_TR:GOSUB *S_ON
- 54700 GOSUB *S_CUR
- 54710 S_ENX=(S_X-15) \ 6+1
- 54720 IF S_ENX-1>LEN(S_MK$) THEN S_ENX=LEN(S_MK$)+1
- 54730 GOSUB *S_CUR:GOSUB *S_WH
- 54740 ELSE IF S_X>=3 AND S_Y>=54 AND S_X<=86 AND S_Y<=125 THEN
- 54750 S_I=(S_X-3)\12:S_J=(S_Y-54)\12
- 54760 S_X=S_SX+3+S_I*12:S_Y=S_SY+54+S_J*12
- 54770 GOSUB *S_13:LINE(S_X,S_Y)-(S_X+11,S_Y+11),XOR,,BF
- 54780 S_I=S_I+S_J*7
- 54790 IF S_I<26 THEN S_I=S_I+&H41 ELSE S_I=S_I-26+&H2E
- 54800 IF S_I=&H2F THEN S_I=&H5F
- 54810 IF S_I=&H3A THEN S_I=&H8
- 54820 IF S_I=&H3B THEN S_I=&H1D
- 54830 IF S_I=&H3C THEN S_I=&H1C
- 54840 IF S_I=&H3D THEN S_I=&H7F
- 54850 S_A$=CHR$(S_I):GOSUB *S_KEY:GOSUB *S_CUR:S_A$=""
- 54860 GOSUB *S_WH:GOSUB *S_13:LINE(S_X,S_Y)-(S_X+11,S_Y+11),XOR,,BF
- 54870 ENDIF
- 54880 ENDIF
- 54890 IF S_A$<>"" THEN GOSUB *S_KEY:GOSUB *S_CUR
- 54900 WEND
- 54910 GOSUB *S_CUR:S_Q=0
- 54920 PUT@A(S_SX+2,S_SY+29)-(S_SX+87,S_SY+126),S_SEL%,,,,,200
- 54930 S_TR=9:GOSUB *S_TR:GOSUB *S_OFF
- 54940 S_TR=10:GOSUB *S_TR:GOSUB *S_OFF:RETURN
- 54950 '■ ファイル名を入力する
- 54960 *S_ENT
- 54970 S_ENX=(S_X-15) \ 6+1
- 54980 IF S_ENX-1>LEN(S_MK$) THEN S_ENX=LEN(S_MK$)+1
- 54990 WHILE S_Q=0
- 55000 GOSUB *S_CUR
- 55010 S_A$=""
- 55020 WHILE S_A$=""
- 55030 S_A$=INKEY$:GOSUB *S_MOUSE0:S_X=S_X-S_SX:S_Y=S_Y-S_SY
- 55040 IF MOUSE(2,0) THEN
- 55050 GOSUB *S_CUR
- 55060 IF S_X<15 OR S_Y<130 OR S_X>86 OR S_Y>143 THEN RETURN *S_MAIN
- 55070 S_ENX=(S_X-15) \ 6+1
- 55080 IF S_ENX-1>LEN(S_MK$) THEN S_ENX=LEN(S_MK$)+1
- 55090 GOSUB *S_CUR
- 55100 ENDIF
- 55110 IF MOUSE(2,1) THEN S_A$=CHR$(13):WHILE MOUSE(2,1):WEND
- 55120 WEND
- 55130 GOSUB *S_KEY
- 55140 WEND
- 55150 S_Q=0:RETURN
- 55160 '■ 入力されたキーの処理
- 55170 *S_KEY
- 55180 GOSUB *S_CUR
- 55190 IF S_A$=CHR$(13) THEN S_Q=1:RETURN
- 55200 IF S_A$=CHR$(8) AND S_ENX>1 THEN
- 55210 S_I=0
- 55220 IF S_ENX>2 THEN IF JIS(MID$(S_MK$,S_ENX-2,2))>255 THEN S_I=-1
- 55230 S_MK$=LEFT$(S_MK$,S_ENX-2+S_I)+MID$(S_MK$,S_ENX)
- 55240 GOSUB *S_CLR:S_ENX=S_ENX-1+S_I:S_I=0
- 55250 ELSE IF S_A$=CHR$(28) AND S_ENX-1<LEN(S_MK$) THEN
- 55260 S_ENX=S_ENX+1
- 55270 IF JIS(MID$(S_MK$,S_ENX-1,2))>255 THEN S_ENX=S_ENX+1
- 55280 ELSE IF S_A$=CHR$(127) THEN
- 55290 IF LEN(MID$(S_MK$,S_ENX))>1 THEN
- 55300 IF JIS(MID$(S_MK$,S_ENX,2))>255 THEN S_I=-1 ELSE S_I=0
- 55310 ENDIF
- 55320 S_MK$=LEFT$(S_MK$,S_ENX-1)+MID$(S_MK$,S_ENX+1-S_KK):S_I=0
- 55330 GOSUB *S_CLR
- 55340 ENDIF
- 55350 IF S_A$=CHR$(29) AND S_ENX>1 THEN S_ENX=S_ENX-1
- 55360 IF ASC(S_A$)<32 OR ASC(S_A$)>126 THEN RETURN
- 55370 IF LEN(S_MK$)<12 THEN
- 55380 S_MK$=LEFT$(S_MK$,S_ENX-1)+S_A$+MID$(S_MK$,S_ENX)
- 55390 GOSUB *S_CLR:IF S_ENX<12 THEN S_ENX=S_ENX+1
- 55400 ENDIF
- 55410 RETURN
- 55420 '■ カーソル
- 55430 *S_CUR
- 55440 IF S_ENX>1 THEN IF JIS(MID$(S_MK$,S_ENX-1,2))>255 THEN S_ENX=S_ENX-1
- 55450 IF S_ENX>12 THEN S_ENX=12
- 55460 S_I=S_SX+(S_ENX-1)*6+15
- 55470 GOSUB *S_13:LINE(S_I,S_SY+131)-(S_I+1,S_SY+142),XOR,,B
- 55480 RETURN
- 55490 '■ パスを取得
- 55500 *S_PATH
- 55510 S_RET&=CALLM(S_O&,1):S_DRV$=CHR$(S_RET&):S_PATH$=STRING$(65,"a")
- 55520 S_RET&=CALLM(S_O&,2,ASC(S_DRV$),VARPTR(S_PATH$))
- 55530 S_PATH$=KLEFT$(S_PATH$,KINSTR(S_PATH$+" "," ")-1)
- 55540 S_PATH$=S_DRV$+":"+S_PATH$
- 55550 IF MID$(S_PATH$,3)<>"\" THEN S_PATH$=S_PATH$+"\"
- 55560 RETURN